<!DOCTYPE html>
<html>
<head>
	<title>iframe editor</title>
</head>
<body>
	<iframe id="editor" src="about:blank"></iframe>
	<script type="text/javascript">
		(function(){
			var editor = document.getElementById('editor');
			editor.contentDocument.designMode = 'on'; //开启编辑模式
		})();
	</script>
</body>
</html>